<?php
class Default_Form_Contact extends Zend_Form{

	public function init(){
		//$this->setDisableLoadDefaultDecorators(true);
		//Thiết lập ngon ngữ
		$translate = Zend_Registry::get('Zend_Translate');
		
		$this->setAttrib('id', 'frm-contact');
		$this->setAttrib('class', 'frm-default clearfix');
		
		//email
		$email = $this->createElement('text', 'email');
		$email->setLabel($translate->translate('Email'));
		$email->setRequired(true);
		$email->addValidator('emailAddress',false);
        //$email->setDecorators(array('ViewHelper','Errors'));
		
        $content = $this->createElement('textarea','content');
        $content->setLabel('Nội dung');
        $content->setRequired(true);       		
		//$content->setDecorators(array('ViewHelper','Errors'));
        
		//submit		
		$submit = $this->createElement('submit', 'submit')->setAttrib('class', 'button');
		$submit->setLabel($translate->translate('Gửi'));
		$this->addElements(array(
				$email,
                $content,
				$submit
		));
	}
}